package com.zhxy.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhxy.pojo.Clazz;
import com.zhxy.pojo.Student;
import com.zhxy.service.ClazzService;
import com.zhxy.utils.PageResult;
import com.zhxy.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/clazz")
@Api(tags = "班级模块")
public class ClazzController {
    @Autowired
    private ClazzService clazzService;

    @GetMapping("/list")
    @ApiOperation(value = "查询列表功能")
    public Result list() throws Exception{
        List<Clazz> list = clazzService.showList();
        return Result.ok(list,"班级列表查询成功");
    }
}
